1. /* sxcbgpi.cpp by K.Tsuru */
  2. // function ID 5103 BRADIX
  3. /**********************
  4. SDecimal class
  5. pi by Gauss's formura
  6. ***********************/
  7. #ifndef SN_H
  8. #include "sn.h"
  9. #endif
  10. SDecimal BGaussPi(){
  11. SDecimal pi, y;
  12. XsMult(Batan2(1,18),48,pi); // 48*atan(1/18)
  13. XsMult(Batan2(1,57),32,y); // y = 32*atan(1/57)
  14. XXAdd(pi, y, pi);
  15. XsMult(Batan2(1, 239),20, y); // y = 20*atan(1/239)
  16. XXSub(pi, y, pi);
  17. return pi;
  18. }
  19. // function ID 3504 DRADIX
  20. SDouble GaussPi(){
  21. return BGaussPi().ConvToDec();
  22. }

sxcbgpi.cpp : last modifiled at 2016/09/04 14:21:44(540 bytes)
created at 2015/12/22 16:09:56
The creation time of this html file is 2017/10/27 15:45:59 (Fri Oct 27 15:45:59 2017).